package com.license.logic.preference;

import java.sql.Time;

import com.license.common.util.Utils;

public class Activity {
	
	private String name;
	private Time startTime;
	private Time endTime;
	private int minutes;
	private int kalories;
	private double kg;
	
	private Utils utils;
	
	public Activity() {
		 utils = new Utils();
	}
	
	public Time getStartTime() {
		return startTime;
	}
	public void setStartTime(Time startTime) {
		this.startTime = startTime;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Time getEndTime() {
		return endTime;
	}
	public void setEndTime(Time endTime) {
		this.endTime = endTime;
	}
	public int getMinutes() {
		return minutes;
	}
	public void setMinutes(int minutes) {
		this.minutes = minutes;
	}
	public int getKalories() {
		return kalories;
	}
	public void setKalories(int kalories) {
		this.kalories = kalories;
	}
	public double getKg() {
		return kg;
	}
	public void setKg(double kg) {
		this.kg = kg;
	}
	
	public double getKaloriesConsumed(){
		// in databases, kalories for activity are stored according to an interval of 60 minutes and a weight of 10 kg
		return utils.twoDecimalPlaces(this.minutes * this.kalories * this.kg / 60 / 10); 
	}
}
